# 版本信息
#java：latest 为centos官方java运行环境镜像，600多M ,可以提前pull到主机本地
FROM java:latest

ADD target/search-service-0.0.1-SNAPSHOT.jar /usr/local/jar/

RUN mv /usr/local/jar/search-service-0.0.1-SNAPSHOT.jar  /usr/local/jar/app.jar
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
#开启内部服务端口 search-service 项目端口
EXPOSE 8095

CMD ["java","-Dspring.profiles.active=test","-jar","/usr/local/jar/app.jar"]
